home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 3140.ZIP / INSTALL.BAT < prev    next >
DOS Batch File  |  1991-10-29  |  5KB  |  134 lines

  1. @echo off
  2. echo off
  3. rem PhDbase installation batch file, modified 10/29/91.
  4. cls
  5. echo.  
  6. echo ┌────────────────────────────────────────────────────────────────────────┐
  7. echo │                    PhDbase 2.0 Installation                            │
  8. echo └────────────────────────────────────────────────────────────────────────┘
  9. echo   This program will install PhDbase 2.0 into your FoxPro directory.  
  10. echo   It will place the files PHDBASE.APP, PHDBASE.SET, PHDBASE.HLP, 
  11. echo   PHDBASE.FPT, and PHSAMPLE.DBF directly into your FoxPro directory.  
  12. echo   It will also create a subdirectory within your FoxPro directory 
  13. echo   called PHDBASE (i.e. C:\FOXPRO2\PHDBASE\) which will contain
  14. echo   PhDbase's auxiliary documentation files (such as README.DOC).
  15. echo.  
  16. echo   If you are installing PhDbase from a floppy disk, move to your FoxPro
  17. echo   home directory and type "a:install" or "b:install".
  18. echo.  
  19. echo   If you are installing a version of PhDbase that was compressed for
  20. echo   electronic distribution, uncompress all the files into a temporary
  21. echo   directory, and make that the current directory.  Now type "install xxx",
  22. echo   replacing xxx with your FoxPro directory, INCLUDING A TRAILING BACKSLASH.
  23. echo   (e.g. "install c:\foxpro2\").  If you installed from a temporary
  24. echo   directory, you may then delete the files from the temporary directory.
  25. echo.  
  26. echo   Press Ctrl-C now to abort the installation process, or press any
  27. echo   other key to continue...
  28. pause >nul
  29. cls
  30. echo.  
  31. echo ┌────────────────────────────────────────────────────────────────────────┐
  32. echo │               Checking for presence of FOXPRO*.EXE...                  │
  33. echo └────────────────────────────────────────────────────────────────────────┘
  34. if exist %1foxpro*.exe goto okay
  35. if not .%1 == . goto specified
  36. echo   Can't find FOXPRO*.EXE in the current directory!
  37. echo.  
  38. echo   Please change directories to your FoxPro directory and then run
  39. echo   install again.  Or, if you're installing from a subdirectory on a
  40. echo   hard disk, specify your FoxPro directory on the install command line.
  41. goto exit
  42. :specified
  43. echo   Can't find FOXPRO*.EXE in %1!
  44. echo.  
  45. echo   Make sure your path specification includes the trailing backslash and
  46. echo   then run install again.  Or, if you're installing from a floppy, you
  47. echo   can switch to your FoxPro directory and type A:INSTALL or B:INSTALL.
  48. goto exit
  49. :okay
  50. echo   Found FOXPRO*.EXE...
  51. rem
  52. rem Set install drive to A:, B:, C:, or D:.
  53. rem
  54. for %%f in (a:install,A:INSTALL) do if %0 == %%f goto adrive
  55. for %%f in (b:install,B:INSTALL) do if %0 == %%f goto bdrive
  56. for %%f in (c:install,C:INSTALL) do if %0 == %%f goto cdrive
  57. for %%f in (d:install,D:INSTALL) do if %0 == %%f goto ddrive
  58. set %_drive=
  59. rem
  60. rem If no drive, don't allow anything but "install" by itself.
  61. rem
  62. for %%f in (install,INSTALL) do if %0 == %%f goto skipdrive
  63. echo.  
  64. echo  There are two valid forms of the install command.  If you are
  65. echo  installing from a floppy disk, switch to your FoxPro home directory
  66. echo  and type "a:install" or "b:install".  If you have already copied
  67. echo  or unzipped the PhDbase files to a subdirectory on your hard disk,
  68. echo  switch to that directory and type "install xxx", where xxx is the
  69. echo  full path to your FoxPro home directory, including the trailing
  70. echo  backslash.
  71. goto exit
  72. :adrive
  73. set %_drive=a:
  74. goto skipdrive
  75. :bdrive
  76. set %_drive=b:
  77. goto skipdrive
  78. :cdrive
  79. set %_drive=c:
  80. goto skipdrive
  81. :ddrive
  82. set %_drive=d:
  83. :skipdrive
  84. rem
  85. rem Make sure we're not going to be copying the FoxPro directory
  86. rem
  87. if not exist %_drive%foxpro*.exe goto not_in_foxpro
  88. echo.  
  89. echo   You have apparently already copied or unzipped the PhDbase files
  90. echo   to your FoxPro directory.  In this case, no additional installation
  91. echo   is needed.
  92. echo.  
  93. goto all_done
  94. :not_in_foxpro
  95. echo.  
  96. echo ┌────────────────────────────────────────────────────────────────────────┐
  97. echo │               Copying files to FoxPro directory...                     │
  98. echo └────────────────────────────────────────────────────────────────────────┘
  99. echo   Copying PHDBASE.APP...
  100. copy %_drive%phdbase.app %1phdbase.app >nul
  101. echo   Copying PHDBASE.SET...
  102. copy %_drive%phdbase.set %1phdbase.set >nul
  103. echo   Copying PHDBASE.HLP...
  104. copy %_drive%phdbase.hlp %1phdbase.hlp >nul
  105. echo   Copying PHDBASE.FPT...
  106. copy %_drive%phdbase.fpt %1phdbase.fpt >nul
  107. echo   Copying PHSAMPLE.DBF...
  108. copy %_drive%phsample.dbf %1phsample.dbf >nul
  109. echo.  
  110. echo ┌────────────────────────────────────────────────────────────────────────┐
  111. echo │               Copying files to PhDbase subdirectory...                 │
  112. echo └────────────────────────────────────────────────────────────────────────┘
  113. echo   Creating PhDbase subdirectory...
  114. if not exist %1phdbase\*.* md %1phdbase
  115. echo   Copying auxiliary files...
  116. copy %_drive%*.* %1phdbase >nul
  117. rem
  118. rem Remove redundant files.
  119. rem
  120. if exist %1phdbase\phdbase.app del %1phdbase\phdbase.app >nul
  121. if exist %1phdbase\phdbase.set del %1phdbase\phdbase.set >nul
  122. if exist %1phdbase\phdbase.hlp del %1phdbase\phdbase.hlp >nul
  123. if exist %1phdbase\phdbase.fpt del %1phdbase\phdbase.fpt >nul
  124. if exist %1phdbase\phsample.dbf del %1phdbase\phsample.dbf >nul
  125. rem
  126. set %_drive=
  127. :all_done
  128. echo.  
  129. echo   Installation done!
  130. echo.  
  131. echo   To install PhDbase on your FoxPro system menu,
  132. echo   start up FoxPro and type DO %1PHDBASE.
  133. :exit
  134.